﻿<navigation:Page
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:loginWin="clr-namespace:TelecoSystems.LoginUI"
           xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" x:Class="TelecoSystems.LoginUI.LoginContainer"
           d:DesignWidth="720" d:DesignHeight="480"
           Title="LoginContainer Page" Background="#FF000000">
	<navigation:Page.Resources>
		<Storyboard x:Name="StoryboardLoginFadeIn">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="StoryboardLoginFadeOut">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.65"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="20"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="loginRegistrationWindow">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="30"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</navigation:Page.Resources>
    <Grid x:Name="LayoutRoot">
    	 <Grid.Background>    	 	
			<ImageBrush Opacity="0.80" ImageSource="../../Assets/Images/login-background.jpg" />
        </Grid.Background>
        <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Center" Opacity="0.4" VerticalAlignment="Top">
            <Image Source="/TelecoSystems;component/Assets/Images/logo.png" Width="64" Margin="0,0,30,0" />
            <TextBlock Text="TelecoSystems RIA Client" VerticalAlignment="Center" FontWeight="Normal" FontSize="26" Foreground="WhiteSmoke"/>
        </StackPanel>
        <loginWin:LoginRegistrationWindow x:Name="loginRegistrationWindow" HasCloseButton="False" VerticalAlignment="Center" Opacity="0.65" HorizontalAlignment="Center">
        	<loginWin:LoginRegistrationWindow.Projection>
        		<PlaneProjection RotationX="20" RotationY="30"/>
        	</loginWin:LoginRegistrationWindow.Projection>            
        	<i:Interaction.Triggers>
        		<i:EventTrigger EventName="MouseEnter">
        			<im:ControlStoryboardAction Storyboard="{StaticResource StoryboardLoginFadeIn}"/>
        		</i:EventTrigger>
        		<i:EventTrigger EventName="MouseLeave">
        			<im:ControlStoryboardAction Storyboard="{StaticResource StoryboardLoginFadeOut}"/>
        		</i:EventTrigger>
				<i:EventTrigger EventName="LostFocus">
        			<im:ControlStoryboardAction Storyboard="{StaticResource StoryboardLoginFadeOut}"/>
        		</i:EventTrigger>
				<i:EventTrigger EventName="GotFocus">
					<im:ControlStoryboardAction Storyboard="{StaticResource StoryboardLoginFadeIn}"/>
				</i:EventTrigger>
        	</i:Interaction.Triggers>            
        </loginWin:LoginRegistrationWindow>
        <StackPanel  Margin="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Vertical">
            <TextBlock Text="Lukas Zdechovan (Bachelor thesis, FMFI UK)" FontSize="12" Foreground="WhiteSmoke" />
            <HyperlinkButton x:Name="BCHyperlink" Content="{Binding NavigateUri, ElementName=BCHyperlink}" FontSize="11" NavigateUri="http://bachelorthesis.zdechovan.com" TargetName="_blank" HorizontalAlignment="Right" />
        </StackPanel>
    </Grid>
</navigation:Page>
